package 经理与员工工资案例;

public class Employee extends Person{
    private String employeeID;
    private double salary;
    private int seniority;//工龄

    public Employee(String name, String address, String employeeID, double salary, int seniority) {
        super(name, address);
        this.employeeID = employeeID;
        this.salary = salary;
        this.seniority = seniority;
    }

    public Employee() {
    }

    public String getEmployeeID() {
        return employeeID;
    }

    public void setEmployeeID(String employeeID) {
        this.employeeID = employeeID;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public int getSeniority() {
        return seniority;
    }

    public void setSeniority(int seniority) {
        this.seniority = seniority;
    }

    public void raiseSalary() {
        salary += 10;
    }

    @Override
    public String toString() {
        return "\nEmployee ID: " + employeeID + "\nName: " + getName() + "\nAddress: " + getAddress()
                 + "\nSalary: " + salary + "\nseniority: " + seniority;
    }
}
